package cn.caskm.souvenirshopsystem.service;

import cn.caskm.souvenirshopsystem.domain.Result;
import cn.caskm.souvenirshopsystem.domain.dto.PageDTO;
import cn.caskm.souvenirshopsystem.domain.po.ShoppingCart;
import cn.caskm.souvenirshopsystem.domain.query.PageQuery;
import cn.caskm.souvenirshopsystem.domain.vo.ShopCartVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

public interface ShoppingCartService extends IService<ShoppingCart> {

    Result<PageDTO<ShoppingCart>> page(PageQuery query);
    
    Result<List<ShoppingCart>> getAll();

    Result<ShoppingCart> detail(Integer id);

    void saveOrUpdateEntity(ShoppingCart shoppingCart);

    void addOrRemoveGoodsToCart(Integer goodsId, Boolean ifAdd);

    void updateAllCheckStatus(Boolean flag);

    void deleteCart(List<Integer> goodsIds);

    Result<List<ShopCartVO>> listCart();

}
